﻿<%@ Import Namespace="AspNetMvc" %>
<%@ Import Namespace="WebGuiMvc" %>
<h3>
    <%= ViewStrings.EventsStrings.Comment %>:</h3>
<% using (Html.BeginForm(MVC.Event.ActionNames.PostComment, MVC.Event.Name, FormMethod.Post))
   { %>
<p>
    <%= Html.TextArea("Comment", new { cols="40", rows="6" })%>
    <%= Html.Hidden("EventId", Model.Event.Id)%></p>
<p>
    <input type="submit" value="<%= ViewStrings.EventsStrings.Post %>" />
</p>
<% } %>
<h3>
    <%= ViewStrings.EventsStrings.Comments %></h3>
<% if (Model.Comments.Count() == 0)
   { %>
<p>
    <%= ViewStrings.EventsStrings.NoComments %></p>
<% }
   else
   {
       foreach (var comment in Model.Comments)
   {
%>
<p class="fo22">
    <strong><%: comment.User.Login %></strong> | <%: comment.Date %>
</p>
<p>
    <%: comment.Comment %></p>
<%} %>
<% } %>
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<AspNetMvc.Models.EventForView>" %>